
import { Session } from '@/util/storage';

export const OPEN_URL =
  process.env.NODE_ENV == 'development' ? 'http://localhost:8080/financialLogin' :
    process.env.NODE_ENV == "checkTest" ? "http://enterprise.91yikuaiji.com:8756/financialLogin" :
      process.env.NODE_ENV == "pre" ? "http://enterprise.91yikuaiji.com:8756/financialLogin" :
        process.env.NODE_ENV == "prod" ? "https://zhangsanfeng.vip/financialLogin" :
          process.env.NODE_ENV == "newProd" ? 'https://enterprise.zhangsanfeng.vip' : '';


export const quitLogin = () => {
  Session.clear();
  if (process.env.NODE_ENV == 'development') {
    window.location.replace('http://localhost:8080/financialLogin');
  } else if (process.env.NODE_ENV == "checkTest") {
    window.location.replace('http://enterprise.91yikuaiji.com:8756/financialLogin');
  } else if (process.env.NODE_ENV == "pre") {
    window.location.replace('http://enterprise.91yikuaiji.com:8756/financialLogin');
  } else if (process.env.NODE_ENV == "prod") {
    window.location.replace('https://zhangsanfeng.vip/financialLogin');
  }else if (process.env.NODE_ENV == "newProd") {
    window.location.replace('https://enterprise.zhangsanfeng.vip');
  } else {
    return;
  }
};
